package cn.cs.mapper;

import cn.cs.pojo.CsMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CsMenuMapper {

    public CsMenu getCsMenuById(@Param(value = "id") Long id) throws Exception;

    public List<CsMenu> getCsMenuByRoleName(@Param(value = "roleName") String roleName);


    public List<CsMenu> getMenuTree(@Param(value = "roles") List<String> roles, @Param(value = "ids") List<String> ids);

    public List<CsMenu> getMenuList(@Param(value = "pId") String pId, @Param(value = "roles") List<String> roles, @Param(value = "ids") List<String> ids);

    public List<CsMenu> getMenuByRoleId(@Param(value = "id") String id);

    public List<CsMenu> getCsMenuListByMap(Map<String, Object> param);

    public Integer getCsMenuCountByMap(Map<String, Object> param) throws Exception;

    public Integer insertCsMenu(CsMenu csMenu) throws Exception;

    public Integer updateCsMenu(CsMenu csMenu) throws Exception;

    public Integer deleteCsMenuById(@Param(value = "id") Long id) throws Exception;

    public List<CsMenu> getMenuListAll(@Param(value = "roles") List<String> roles, @Param(value = "ids") List<String> ids);

}
